{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 课程论文"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " 请务必交到exer8文件夹下，**谢绝交到master下**\n",
    "+ 请不要改动任何文件，拜托\n",
    "+ 请于12月30日前先在github上提交\n",
    "+ 请在元旦后提交纸质版，将本页面文件先打印为pdf格式，再去打印店付印\n",
    "+ 请将论文模板和本页面文件一起装订，前者放上面，本页面文件放下面\n",
    "+ 纸质版提交时间和地点请留意微信群通知"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "请写一下姓名和学号：\n",
    "+ 姓名  黄鹏辉\n",
    "+ 学号 0161918"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 样本均值分布的统计试验"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "+ 请将CEPS.csv数据读入python\n",
    "+ 请从中随机抽取1000个数据\n",
    "+ 请根据问卷从数据中挑选两个连续型变量（likert量表可以近似看作连续变量）\n",
    "+ 计算这两个连续变量的均值\n",
    "+ 重复随机抽取—计算均值这个过程30次，得到两个变量30个样本均值\n",
    "+ 绘制这30个样本均值的直方图\n",
    "+ 计算均值的均值和标准误"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "import matplotlib\n",
    "from matplotlib.ticker import MultipleLocator, FormatStrFormatter\n",
    "plt.rcParams['font.sans-serif']=['SimHei']\n",
    "plt.rcParams['axes.unicode_minus']=False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\97657\\Anaconda3\\lib\\site-packages\\IPython\\core\\interactiveshell.py:2785: DtypeWarning: Columns (20,22,23,25,28,29,39,49,74,124,125,126,127,128,129,130,131,138,140,141,147,160,161,162,165,170,174,175,176,177,179,180,181,182,183,184,188,191,194,195,196,199,221,222,223,224,251,252,254,289,290,294,295,296) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  interactivity=interactivity, compiler=compiler, result=result)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ids</th>\n",
       "      <th>clsids</th>\n",
       "      <th>schids</th>\n",
       "      <th>ctyids</th>\n",
       "      <th>frame</th>\n",
       "      <th>subsample</th>\n",
       "      <th>sweight</th>\n",
       "      <th>fall</th>\n",
       "      <th>grade9</th>\n",
       "      <th>stcog</th>\n",
       "      <th>...</th>\n",
       "      <th>steco_3c</th>\n",
       "      <th>stonly</th>\n",
       "      <th>stsib</th>\n",
       "      <th>stsibrank</th>\n",
       "      <th>stmedu</th>\n",
       "      <th>stfedu</th>\n",
       "      <th>stprhedu</th>\n",
       "      <th>stfdrunk</th>\n",
       "      <th>stprfight</th>\n",
       "      <th>stprrel</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>218.738892</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>216.518234</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>17</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>8</td>\n",
       "      <td>5</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>216.518234</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>218.738892</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>6</td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>217.553040</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 300 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   ids  clsids  schids  ctyids  frame  subsample     sweight  fall  grade9  \\\n",
       "0    1       1       1       1      3          3  218.738892     0       0   \n",
       "1    2       1       1       1      3          3  216.518234     0       0   \n",
       "2    3       1       1       1      3          3  216.518234     0       0   \n",
       "3    4       1       1       1      3          3  218.738892     0       0   \n",
       "4    5       1       1       1      3          3  217.553040     0       0   \n",
       "\n",
       "   stcog   ...    steco_3c stonly stsib stsibrank stmedu stfedu stprhedu  \\\n",
       "0     11   ...           3      1                      3      3        3   \n",
       "1     17   ...           2      1                      8      5        8   \n",
       "2     12   ...           2      2     1         3      3      3        3   \n",
       "3     10   ...           2      1                      6      7        7   \n",
       "4     10   ...           3      1                      7      8        8   \n",
       "\n",
       "  stfdrunk stprfight stprrel  \n",
       "0        1         1       2  \n",
       "1        1         1       2  \n",
       "2        1         1       1  \n",
       "3        1         1       2  \n",
       "4        1         1       2  \n",
       "\n",
       "[5 rows x 300 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#导入数据后面选择的是a16,和a17所以在这里把他们取出来做缺失值的处理\n",
    "sentinels= {'a16': [' '], 'a17': [' ']}\n",
    "df = pd.read_csv('CEPS.csv',encoding='gb2312',na_values=sentinels)\n",
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ids</th>\n",
       "      <th>clsids</th>\n",
       "      <th>schids</th>\n",
       "      <th>ctyids</th>\n",
       "      <th>frame</th>\n",
       "      <th>subsample</th>\n",
       "      <th>sweight</th>\n",
       "      <th>fall</th>\n",
       "      <th>grade9</th>\n",
       "      <th>stcog</th>\n",
       "      <th>...</th>\n",
       "      <th>steco_3c</th>\n",
       "      <th>stonly</th>\n",
       "      <th>stsib</th>\n",
       "      <th>stsibrank</th>\n",
       "      <th>stmedu</th>\n",
       "      <th>stfedu</th>\n",
       "      <th>stprhedu</th>\n",
       "      <th>stfdrunk</th>\n",
       "      <th>stprfight</th>\n",
       "      <th>stprrel</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>11441</th>\n",
       "      <td>11442</td>\n",
       "      <td>273</td>\n",
       "      <td>71</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2340.483398</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>6</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7505</th>\n",
       "      <td>7506</td>\n",
       "      <td>191</td>\n",
       "      <td>50</td>\n",
       "      <td>13</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>1281.535767</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>14</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>6</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14605</th>\n",
       "      <td>14606</td>\n",
       "      <td>339</td>\n",
       "      <td>88</td>\n",
       "      <td>22</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3043.176025</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15023</th>\n",
       "      <td>15024</td>\n",
       "      <td>348</td>\n",
       "      <td>90</td>\n",
       "      <td>23</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>334.489166</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10312</th>\n",
       "      <td>10313</td>\n",
       "      <td>252</td>\n",
       "      <td>66</td>\n",
       "      <td>17</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1950.220581</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>15</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15331</th>\n",
       "      <td>15332</td>\n",
       "      <td>356</td>\n",
       "      <td>92</td>\n",
       "      <td>23</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>272.099854</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2436</th>\n",
       "      <td>2437</td>\n",
       "      <td>61</td>\n",
       "      <td>16</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1753.056519</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>190</th>\n",
       "      <td>191</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>208.862442</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5970</th>\n",
       "      <td>5971</td>\n",
       "      <td>159</td>\n",
       "      <td>41</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>341.002991</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>6</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11547</th>\n",
       "      <td>11548</td>\n",
       "      <td>275</td>\n",
       "      <td>71</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2193.395508</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>12</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6486</th>\n",
       "      <td>6487</td>\n",
       "      <td>170</td>\n",
       "      <td>45</td>\n",
       "      <td>12</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2059.395020</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3155</th>\n",
       "      <td>3156</td>\n",
       "      <td>79</td>\n",
       "      <td>20</td>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>206.916641</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>12</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>6</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4917</th>\n",
       "      <td>4918</td>\n",
       "      <td>131</td>\n",
       "      <td>33</td>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>95.700287</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>11</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>4</td>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11003</th>\n",
       "      <td>11004</td>\n",
       "      <td>266</td>\n",
       "      <td>69</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2486.153076</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6687</th>\n",
       "      <td>6688</td>\n",
       "      <td>174</td>\n",
       "      <td>46</td>\n",
       "      <td>12</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1868.916992</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14063</th>\n",
       "      <td>14064</td>\n",
       "      <td>327</td>\n",
       "      <td>85</td>\n",
       "      <td>22</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2454.187988</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1606</th>\n",
       "      <td>1607</td>\n",
       "      <td>43</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2962.799561</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>14</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>8</td>\n",
       "      <td>4</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7453</th>\n",
       "      <td>7454</td>\n",
       "      <td>190</td>\n",
       "      <td>50</td>\n",
       "      <td>13</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>1281.535767</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>15</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5732</th>\n",
       "      <td>5733</td>\n",
       "      <td>152</td>\n",
       "      <td>39</td>\n",
       "      <td>10</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>63.501114</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1177</th>\n",
       "      <td>1178</td>\n",
       "      <td>35</td>\n",
       "      <td>9</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2731.031250</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>16</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>8</td>\n",
       "      <td>9</td>\n",
       "      <td>9</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15365</th>\n",
       "      <td>15366</td>\n",
       "      <td>357</td>\n",
       "      <td>92</td>\n",
       "      <td>23</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>683.496338</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>19</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>4</td>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1316</th>\n",
       "      <td>1317</td>\n",
       "      <td>38</td>\n",
       "      <td>10</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2457.206299</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>4</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11347</th>\n",
       "      <td>11348</td>\n",
       "      <td>272</td>\n",
       "      <td>71</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2327.358398</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12505</th>\n",
       "      <td>12506</td>\n",
       "      <td>293</td>\n",
       "      <td>76</td>\n",
       "      <td>19</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>4246.434570</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>5</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11190</th>\n",
       "      <td>11191</td>\n",
       "      <td>269</td>\n",
       "      <td>70</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2495.833008</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3406</th>\n",
       "      <td>3407</td>\n",
       "      <td>84</td>\n",
       "      <td>21</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3697.687012</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>11</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>6</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3141</th>\n",
       "      <td>3142</td>\n",
       "      <td>79</td>\n",
       "      <td>20</td>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>206.916641</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>12</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>6</td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8538</th>\n",
       "      <td>8539</td>\n",
       "      <td>216</td>\n",
       "      <td>56</td>\n",
       "      <td>14</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>431.156555</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>18</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5526</th>\n",
       "      <td>5527</td>\n",
       "      <td>147</td>\n",
       "      <td>38</td>\n",
       "      <td>10</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>73.868042</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>14</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>2</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6079</th>\n",
       "      <td>6080</td>\n",
       "      <td>162</td>\n",
       "      <td>42</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>213.514572</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4013</th>\n",
       "      <td>4014</td>\n",
       "      <td>101</td>\n",
       "      <td>26</td>\n",
       "      <td>7</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>269.633514</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11557</th>\n",
       "      <td>11558</td>\n",
       "      <td>275</td>\n",
       "      <td>71</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2504.348145</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>848</th>\n",
       "      <td>849</td>\n",
       "      <td>26</td>\n",
       "      <td>7</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>215.709335</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10521</th>\n",
       "      <td>10522</td>\n",
       "      <td>256</td>\n",
       "      <td>67</td>\n",
       "      <td>17</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2151.991943</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>7</td>\n",
       "      <td>3</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3383</th>\n",
       "      <td>3384</td>\n",
       "      <td>84</td>\n",
       "      <td>21</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3697.687012</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>18</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11273</th>\n",
       "      <td>11274</td>\n",
       "      <td>270</td>\n",
       "      <td>70</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2489.864258</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>12</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19037</th>\n",
       "      <td>19038</td>\n",
       "      <td>432</td>\n",
       "      <td>111</td>\n",
       "      <td>28</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>338.424561</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6345</th>\n",
       "      <td>6346</td>\n",
       "      <td>168</td>\n",
       "      <td>44</td>\n",
       "      <td>11</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>93.271454</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17980</th>\n",
       "      <td>17981</td>\n",
       "      <td>411</td>\n",
       "      <td>106</td>\n",
       "      <td>27</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2682.243896</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14829</th>\n",
       "      <td>14830</td>\n",
       "      <td>344</td>\n",
       "      <td>89</td>\n",
       "      <td>23</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>322.470703</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>6</td>\n",
       "      <td>2</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11148</th>\n",
       "      <td>11149</td>\n",
       "      <td>268</td>\n",
       "      <td>70</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2509.907959</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>7</td>\n",
       "      <td>3</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17191</th>\n",
       "      <td>17192</td>\n",
       "      <td>398</td>\n",
       "      <td>102</td>\n",
       "      <td>26</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3377.161865</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10805</th>\n",
       "      <td>10806</td>\n",
       "      <td>262</td>\n",
       "      <td>68</td>\n",
       "      <td>17</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2041.106812</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>8</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5255</th>\n",
       "      <td>5256</td>\n",
       "      <td>141</td>\n",
       "      <td>36</td>\n",
       "      <td>9</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>99.204994</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>19</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>8</td>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>580</th>\n",
       "      <td>581</td>\n",
       "      <td>20</td>\n",
       "      <td>5</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>311.049866</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>11</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11565</th>\n",
       "      <td>11566</td>\n",
       "      <td>275</td>\n",
       "      <td>71</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2193.395508</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>11</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18214</th>\n",
       "      <td>18215</td>\n",
       "      <td>416</td>\n",
       "      <td>107</td>\n",
       "      <td>27</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2778.829590</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>14</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15830</th>\n",
       "      <td>15831</td>\n",
       "      <td>368</td>\n",
       "      <td>95</td>\n",
       "      <td>24</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>299.112183</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>13</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10992</th>\n",
       "      <td>10993</td>\n",
       "      <td>265</td>\n",
       "      <td>69</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2272.969238</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16594</th>\n",
       "      <td>16595</td>\n",
       "      <td>388</td>\n",
       "      <td>100</td>\n",
       "      <td>25</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1522.178833</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8947</th>\n",
       "      <td>8948</td>\n",
       "      <td>225</td>\n",
       "      <td>58</td>\n",
       "      <td>15</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3365.785156</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>11</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>6</td>\n",
       "      <td>8</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17800</th>\n",
       "      <td>17801</td>\n",
       "      <td>409</td>\n",
       "      <td>105</td>\n",
       "      <td>27</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2899.065186</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>8</td>\n",
       "      <td>6</td>\n",
       "      <td>8</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7486</th>\n",
       "      <td>7487</td>\n",
       "      <td>191</td>\n",
       "      <td>50</td>\n",
       "      <td>13</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>1281.535767</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>7</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15702</th>\n",
       "      <td>15703</td>\n",
       "      <td>365</td>\n",
       "      <td>94</td>\n",
       "      <td>24</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>348.118011</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td></td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8612</th>\n",
       "      <td>8613</td>\n",
       "      <td>218</td>\n",
       "      <td>57</td>\n",
       "      <td>15</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3161.228516</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1896</th>\n",
       "      <td>1897</td>\n",
       "      <td>50</td>\n",
       "      <td>13</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1714.615723</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13339</th>\n",
       "      <td>13340</td>\n",
       "      <td>310</td>\n",
       "      <td>80</td>\n",
       "      <td>20</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>319.091095</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6606</th>\n",
       "      <td>6607</td>\n",
       "      <td>172</td>\n",
       "      <td>45</td>\n",
       "      <td>12</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2117.026123</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>16</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12302</th>\n",
       "      <td>12303</td>\n",
       "      <td>289</td>\n",
       "      <td>75</td>\n",
       "      <td>19</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3641.975342</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>11</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18334</th>\n",
       "      <td>18335</td>\n",
       "      <td>419</td>\n",
       "      <td>108</td>\n",
       "      <td>27</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2853.349854</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1000 rows × 300 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         ids  clsids  schids  ctyids  frame  subsample      sweight  fall  \\\n",
       "11441  11442     273      71      18      1          1  2340.483398     1   \n",
       "7505    7506     191      50      13      1          3  1281.535767     0   \n",
       "14605  14606     339      88      22      1          1  3043.176025     0   \n",
       "15023  15024     348      90      23      3          3   334.489166     0   \n",
       "10312  10313     252      66      17      1          1  1950.220581     1   \n",
       "15331  15332     356      92      23      3          3   272.099854     0   \n",
       "2436    2437      61      16       4      1          1  1753.056519     1   \n",
       "190      191       6       2       1      3          3   208.862442     0   \n",
       "5970    5971     159      41      11      3          3   341.002991     1   \n",
       "11547  11548     275      71      18      1          1  2193.395508     1   \n",
       "6486    6487     170      45      12      1          1  2059.395020     1   \n",
       "3155    3156      79      20       5      3          3   206.916641     0   \n",
       "4917    4918     131      33       9      2          2    95.700287     1   \n",
       "11003  11004     266      69      18      1          1  2486.153076     1   \n",
       "6687    6688     174      46      12      1          1  1868.916992     1   \n",
       "14063  14064     327      85      22      1          1  2454.187988     0   \n",
       "1606    1607      43      11       3      1          1  2962.799561     0   \n",
       "7453    7454     190      50      13      1          3  1281.535767     0   \n",
       "5732    5733     152      39      10      3          2    63.501114     1   \n",
       "1177    1178      35       9       3      1          1  2731.031250     0   \n",
       "15365  15366     357      92      23      3          3   683.496338     0   \n",
       "1316    1317      38      10       3      1          1  2457.206299     0   \n",
       "11347  11348     272      71      18      1          1  2327.358398     1   \n",
       "12505  12506     293      76      19      1          1  4246.434570     1   \n",
       "11190  11191     269      70      18      1          1  2495.833008     1   \n",
       "3406    3407      84      21       6      1          1  3697.687012     1   \n",
       "3141    3142      79      20       5      3          3   206.916641     0   \n",
       "8538    8539     216      56      14      3          3   431.156555     0   \n",
       "5526    5527     147      38      10      3          2    73.868042     1   \n",
       "6079    6080     162      42      11      3          3   213.514572     1   \n",
       "...      ...     ...     ...     ...    ...        ...          ...   ...   \n",
       "4013    4014     101      26       7      2          2   269.633514     1   \n",
       "11557  11558     275      71      18      1          1  2504.348145     1   \n",
       "848      849      26       7       2      3          3   215.709335     0   \n",
       "10521  10522     256      67      17      1          1  2151.991943     1   \n",
       "3383    3384      84      21       6      1          1  3697.687012     1   \n",
       "11273  11274     270      70      18      1          1  2489.864258     1   \n",
       "19037  19038     432     111      28      3          3   338.424561     1   \n",
       "6345    6346     168      44      11      3          3    93.271454     1   \n",
       "17980  17981     411     106      27      1          1  2682.243896     1   \n",
       "14829  14830     344      89      23      3          3   322.470703     0   \n",
       "11148  11149     268      70      18      1          1  2509.907959     1   \n",
       "17191  17192     398     102      26      1          1  3377.161865     0   \n",
       "10805  10806     262      68      17      1          1  2041.106812     1   \n",
       "5255    5256     141      36       9      2          2    99.204994     1   \n",
       "580      581      20       5       2      3          3   311.049866     0   \n",
       "11565  11566     275      71      18      1          1  2193.395508     1   \n",
       "18214  18215     416     107      27      1          1  2778.829590     1   \n",
       "15830  15831     368      95      24      3          3   299.112183     0   \n",
       "10992  10993     265      69      18      1          1  2272.969238     1   \n",
       "16594  16595     388     100      25      1          1  1522.178833     1   \n",
       "8947    8948     225      58      15      1          1  3365.785156     1   \n",
       "17800  17801     409     105      27      1          1  2899.065186     1   \n",
       "7486    7487     191      50      13      1          3  1281.535767     0   \n",
       "15702  15703     365      94      24      3          3   348.118011     0   \n",
       "8612    8613     218      57      15      1          1  3161.228516     1   \n",
       "1896    1897      50      13       4      1          1  1714.615723     1   \n",
       "13339  13340     310      80      20      3          3   319.091095     0   \n",
       "6606    6607     172      45      12      1          1  2117.026123     1   \n",
       "12302  12303     289      75      19      1          1  3641.975342     1   \n",
       "18334  18335     419     108      27      1          1  2853.349854     1   \n",
       "\n",
       "       grade9  stcog   ...    steco_3c stonly stsib stsibrank stmedu stfedu  \\\n",
       "11441       0      5   ...           1      2     2         1      6      3   \n",
       "7505        0     14   ...           2      2     2         2      6      3   \n",
       "14605       0     10   ...           2      1                      2      2   \n",
       "15023       0     13   ...           2      1                      7      7   \n",
       "10312       0     15   ...           2      1                      8      8   \n",
       "15331       0     10   ...           2      1                      4      4   \n",
       "2436        0      8   ...           1      2     1         3      2      2   \n",
       "190         0      9   ...           2      2     1         1      3      3   \n",
       "5970        1      6   ...           2      2     1         1      2      3   \n",
       "11547       1     12   ...           2      2     2         1      3      3   \n",
       "6486        0     10   ...           2      1                      3      3   \n",
       "3155        1     12   ...           2      1                      6      3   \n",
       "4917        1     11   ...           1      1                      4      8   \n",
       "11003       1      7   ...           2      2     1         1      3      3   \n",
       "6687        0     11   ...           2      2     1         1      6      6   \n",
       "14063       0     12   ...           2      1                      3      3   \n",
       "1606        1     14   ...           2      1                      8      4   \n",
       "7453        0     15   ...           2      1                      8      6   \n",
       "5732        0      9   ...           2      2     1         3      3      4   \n",
       "1177        1     16   ...           2      1                      8      9   \n",
       "15365       1     19   ...           2      1                      4      8   \n",
       "1316        0     13   ...           2      2     1         1      4      1   \n",
       "11347       0     13   ...           1      2     1         1      3      3   \n",
       "12505       0      7   ...           2      2     2         2      5      3   \n",
       "11190       0      7   ...           2      2     1         3      6      6   \n",
       "3406        1     11   ...           2      1                      6      3   \n",
       "3141        1     12   ...           2      1                      6      7   \n",
       "8538        1     18   ...           2      2     2         1      3      3   \n",
       "5526        0     14   ...           2      1                      2      6   \n",
       "6079        1      8   ...           1      2                      2      2   \n",
       "...       ...    ...   ...         ...    ...   ...       ...    ...    ...   \n",
       "4013        0     13   ...           2      1                      3      3   \n",
       "11557       1     10   ...           2      2     1         1      3      3   \n",
       "848         0     12   ...           2      2     1         1      3      3   \n",
       "10521       0      6   ...           2      1                      7      3   \n",
       "3383        1     18   ...           2      1                      3      3   \n",
       "11273       1     12   ...           1      2     1         3      6      3   \n",
       "19037       0     11   ...           2      1                      7      7   \n",
       "6345        0      5   ...           2      2     1         1      3      6   \n",
       "17980       0      9   ...           2      1                      3      6   \n",
       "14829       0     12   ...           3      1                      6      2   \n",
       "11148       0     10   ...           2      2     1         1      7      3   \n",
       "17191       1     10   ...           1      2     1         1      1      2   \n",
       "10805       1      8   ...           2      2     1         1      2      3   \n",
       "5255        0     19   ...           2      1                      8      7   \n",
       "580         1     11   ...           2      2     1         3      3      3   \n",
       "11565       1     11   ...           2      2     3         2      3      6   \n",
       "18214       0     14   ...           2      2     1         1      3      3   \n",
       "15830       0     13   ...           2      2     1         1      3      2   \n",
       "10992       0      2   ...           1      2     1         3      3      3   \n",
       "16594       0      8   ...           2      2     1         1      3      4   \n",
       "8947        1     11   ...           2      1                      6      8   \n",
       "17800       1     10   ...           2      1                      8      6   \n",
       "7486        0     11   ...           2      1                      7      7   \n",
       "15702       1      5   ...           2      1                                 \n",
       "8612        0     12   ...           2      2     1         1      3      2   \n",
       "1896        0     11   ...           2      2     1         1      2      3   \n",
       "13339       1      5   ...           2      2     1         1      3      3   \n",
       "6606        1     16   ...           3      2     1         3      3      6   \n",
       "12302       0     11   ...           2      2     3         3      3      3   \n",
       "18334       0      9   ...           2      2     1         3      3      3   \n",
       "\n",
       "      stprhedu stfdrunk stprfight stprrel  \n",
       "11441        6        1         1       2  \n",
       "7505         6        1         1       2  \n",
       "14605        2        2         2       2  \n",
       "15023        7        1         1       2  \n",
       "10312        8        1         1       2  \n",
       "15331        4        1         1       2  \n",
       "2436         2        1         1       2  \n",
       "190          3        1         1       2  \n",
       "5970         3        1         1       2  \n",
       "11547        3        1         1       2  \n",
       "6486         3        1         1       2  \n",
       "3155         6        1         1       1  \n",
       "4917         8        1         1       2  \n",
       "11003        3        1         1       2  \n",
       "6687         6        1         1       1  \n",
       "14063        3        1         1       2  \n",
       "1606         8        1         1       2  \n",
       "7453         8        1         1       2  \n",
       "5732         4        1         1       2  \n",
       "1177         9        1         2       1  \n",
       "15365        8        1         1       2  \n",
       "1316         4        2         2       1  \n",
       "11347        3        1         1       2  \n",
       "12505        5        1         1       2  \n",
       "11190        6        1         1       2  \n",
       "3406         6        1         1       2  \n",
       "3141         7        1         1       2  \n",
       "8538         3        1         1       2  \n",
       "5526         6        1         1       2  \n",
       "6079         2        2         2       1  \n",
       "...        ...      ...       ...     ...  \n",
       "4013         3        1         1       2  \n",
       "11557        3        1         1       2  \n",
       "848          3        1         1       2  \n",
       "10521        7        1         1       2  \n",
       "3383         3        2         1       2  \n",
       "11273        6        2         2       2  \n",
       "19037        7        1         1       2  \n",
       "6345         6        1         1       2  \n",
       "17980        6        2         1       2  \n",
       "14829        6        1         1       2  \n",
       "11148        7        1         1       2  \n",
       "17191        2        1         1       2  \n",
       "10805        3        1         1       2  \n",
       "5255         8        2         2       1  \n",
       "580          3        1         1       2  \n",
       "11565        6        1         1       2  \n",
       "18214        3        1         1       2  \n",
       "15830        3        1         1       2  \n",
       "10992        3        1         1       2  \n",
       "16594        4        1         1       2  \n",
       "8947         8        1         1       2  \n",
       "17800        8        1         1       2  \n",
       "7486         7        1         1       2  \n",
       "15702                 2         2       2  \n",
       "8612         3        1         1       2  \n",
       "1896         3        1         1       2  \n",
       "13339        3        1         1       2  \n",
       "6606         6        1         1       2  \n",
       "12302        3        1         1       2  \n",
       "18334        3        1         1       2  \n",
       "\n",
       "[1000 rows x 300 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#取1000个随机数\n",
    "df1=df.sample(1000)\n",
    "df1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "过去一年有没有住过院变量的均值为 1.9225352112676057\n",
      "现在整体健康状况的均值为 4.03420523138833\n"
     ]
    }
   ],
   "source": [
    "#选择两个连续变量，这里选择的是a16过去一年有没有住过院和a17现在整体健康状况\n",
    "x1=df1['a16']\n",
    "print(\"过去一年有没有住过院变量的均值为\",x1.mean())\n",
    "x2=df1['a17']\n",
    "print(\"现在整体健康状况的均值为\",x2.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "第 1 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9006024096385543\n",
      "现在整体健康状况的均值为: 4.017085427135679\n",
      "第 2 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9257773319959879\n",
      "现在整体健康状况的均值为: 4.0311557788944725\n",
      "第 3 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9234642497482377\n",
      "现在整体健康状况的均值为: 4.037260825780463\n",
      "第 4 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9083585095669688\n",
      "现在整体健康状况的均值为: 4.038383838383838\n",
      "第 5 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9255533199195172\n",
      "现在整体健康状况的均值为: 4.050200803212851\n",
      "第 6 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9264112903225807\n",
      "现在整体健康状况的均值为: 4.015151515151516\n",
      "第 7 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.915237134207871\n",
      "现在整体健康状况的均值为: 4.097683786505539\n",
      "第 8 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9266331658291458\n",
      "现在整体健康状况的均值为: 4.068686868686869\n",
      "第 9 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9144008056394763\n",
      "现在整体健康状况的均值为: 4.08366935483871\n",
      "第 10 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9195979899497488\n",
      "现在整体健康状况的均值为: 4.062248995983936\n",
      "第 11 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9153225806451613\n",
      "现在整体健康状况的均值为: 4.038267875125881\n",
      "第 12 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9103726082578045\n",
      "现在整体健康状况的均值为: 4.053319919517103\n",
      "第 13 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9375629405840886\n",
      "现在整体健康状况的均值为: 4.066734074823054\n",
      "第 14 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9181818181818182\n",
      "现在整体健康状况的均值为: 4.112562814070352\n",
      "第 15 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9141414141414141\n",
      "现在整体健康状况的均值为: 4.0604229607250755\n",
      "第 16 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.905775075987842\n",
      "现在整体健康状况的均值为: 4.089808274470232\n",
      "第 17 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9224572004028198\n",
      "现在整体健康状况的均值为: 4.053319919517103\n",
      "第 18 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9366197183098592\n",
      "现在整体健康状况的均值为: 4.03531786074672\n",
      "第 19 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9264112903225807\n",
      "现在整体健康状况的均值为: 4.073366834170854\n",
      "第 20 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.894736842105263\n",
      "现在整体健康状况的均值为: 3.9888438133874238\n",
      "第 21 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.90625\n",
      "现在整体健康状况的均值为: 4.051359516616314\n",
      "第 22 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9189463019250252\n",
      "现在整体健康状况的均值为: 4.049544994944388\n",
      "第 23 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9206030150753768\n",
      "现在整体健康状况的均值为: 4.070281124497992\n",
      "第 24 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9112903225806452\n",
      "现在整体健康状况的均值为: 4.069486404833837\n",
      "第 25 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9387550200803212\n",
      "现在整体健康状况的均值为: 4.053535353535353\n",
      "第 26 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9112008072653885\n",
      "现在整体健康状况的均值为: 4.02929292929293\n",
      "第 27 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9181818181818182\n",
      "现在整体健康状况的均值为: 4.08020304568528\n",
      "第 28 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9133937562940584\n",
      "现在整体健康状况的均值为: 4.062689585439839\n",
      "第 29 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9125628140703517\n",
      "现在整体健康状况的均值为: 4.040160642570281\n",
      "第 30 次结果\n",
      "过去一年有没有住过院变量的均值为: 1.9133064516129032\n",
      "现在整体健康状况的均值为: 4.025125628140704\n"
     ]
    }
   ],
   "source": [
    "#连续上面过程30次\n",
    "mean_a16={}\n",
    "mean_a17={}\n",
    "for i in range(0,30):\n",
    "    df1=df.sample(1000)\n",
    "    print(\"第\",i+1,\"次结果\")\n",
    "    mean_a16_a=df1['a16'].mean()\n",
    "    mean_a16[i+1]= mean_a16_a\n",
    "    print(\"过去一年有没有住过院变量的均值为:\",df1['a16'].mean())\n",
    "    mean_a17_a=df1['a17'].mean()\n",
    "    mean_a17[i+1]= mean_a17_a\n",
    "    print(\"现在整体健康状况的均值为:\",df1['a17'].mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAETCAYAAADKy1riAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3XmYFNW9//H3h30RcUPEBVFjjIlbcIy4RHBBIy5xF42KccENTX43JhrXaNBool6jxgXjdo3migaDccUNJKjRQdR4FRIXYkAxgAoqyjAz398fp2YYmu6eAukZkM/refqZ7qrTp051TdW3zjlVpxQRmJmZ5dGmtQtgZmYrDgcNMzPLzUHDzMxyc9AwM7PcHDTMzCw3Bw2zFiapovudJBWZ1m4Jvt++yftVllW5muTZrVgZbcXgoGHNkrSTpL1LzLtN0tAy3z1Z0j0VKNMwSScsxffOl7RmmfldJfX/EuUqm39mJ0nVkjpk3zlV0m+WcDnnSepUYnY/SY8XTBsnqW+JvK6UdFL2vh0wSVJ7Sd8CXix3gM/W96JmynqPpMObTLoUOKtMejUNVpLaSOpabhnWchw0LI/2wB2SehaZ9ymwoMx3vwA+WZaFkbQ+6cDzTpF57SR1bPK5Y8NBT9IGwH8Bcwq+06HJ2X8v4BpJv8wOVk9KejU7yL9XGCCXIn+AQ4DnIqIm+/wo0JEC2cHz901emzaZ/RkwqMRPtCUwoUk+qwFrAZNKpP8CqAGIiFrgeWAb4Gjg5ih/M9d8ym//RfLP7Ar8sUz6AaTA1RAoegPTG2pATbevtTz55j7LIzsTfho4EtgcaPjH2YB0UPgc2Cd7/wjpoFYHrA2sCrxJCj5dgR9ExCtLWY52wOPA+sD0bHIV8Fq27PbA5Ig4Pkv/GOmAGcCGpIPcjIJsOwLHRcSL2Xc6A8OBK4DRwKCImCVpOPBmRNzepDxLlL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zJaSA4atiL7s/62Dhpktsfnz5/PWW2/lTj9r1qyS89555x3mzJmzRMsvlx/An/70J6ZOnQrAM888w9tvFw40vLja2tpc6fKqrU1jfH7++bJ5btRnn5V+LHrTmsOCBQtYsKDcc62+HAcNsxXYZZddxvTp0xeZNnfuXLbddtui6W+++WYuvvjiL73cu+++m9NPPz13+kGDBvHuu+8WnfePf/yDvfbai3feeYdTTz2VHXbYgT322INNNy09YlC5/Orr6/npT39KfX0aYHj69Ok88MADi6R5//33ufrqq7n66qv529/Sgydramo4++yzKXZx0Lnnnss777zTmO7gg4vffrb99tsDqe9g0KBB1NXV8YMf/IDXX3+9aPprr72W3/9+seeKAfDJJ5+w4447Nn4+7LDDSuZzwAEHMG7cOKZOncptt93Gcccdx9SpU3nrrbcag9ey4udpmC0Ly7qpKudVjVtvvTU//OEPueqqq5g0aRKSqK+vZ86cOdx2223sueeerL322kiiXbt2tG/fni5dugDpjLRh+pKYOXMm5513Hptssgn77rsv77//Pr169aK+vp7PP/+cp59+GoCddtqJbt26MX/+fKZMmcLQoUMb86ipqeHEE0/kiCOOYODAgay++uq8/PLLzJs3j5EjR7LBBhswYMCARZabN78HHniALbfckttvv53HH3+c9u3bU19fz6hRo5g3bx533XUXH3/8Me+++y4LFixgjTXW4IgjjqB3794A7LrrrnzwwQfccMMNjWWYOHEiv/zlLwF4/PHH6dKlC5MnTwZg4403pkOHNCZrt27dAHjiiSfYYostuOmmm/jnP//JSy+9RLdu3dhggw2ora1t/M3bt2+/yO9fOK8h388++4xJkyZx9913N6Y98cQT2XDDDXnrrbfo2LEj8+fP59577+XFF19k/vz53HfffdTW1nLaaac1lmuZiIiv1GvbbbcNs0p7/fXXF52QDvPL7rUE3nvvvXj77bfjsccei8cffzwef/zx+MY3vhEPPfRQzJw5M26//fbYfffdY6+99ootttgiNttss9hrr71i9913j3vuuWeJllVTUxMDBw6MX/3qV43Ttt9++7LfGTp0aNx1111F502bNi122mmnmDFjRsybNy922mmnqK+vj4iI7bbbLiZMmBDTp0/PnV9NTU1stdVWMWTIkMZpTz/9dJx22mmLpHvxxRfjwgsvjP333z+mT58e11133SLz77777pg4cWLU1tbGaqutFv3794+tt946zjvvvNhnn33iiCOOiCFDhsTmm28eb7zxRtx5553xne98J7p37x4HHHBAjB8/PkaNGhW77rpr3HTTTfGnP/0ppk2bFrNnz45ddtkldt9999hpp52CdB9a9O/fP3bffffYZZdd4v33349HHnkk+vXrF6uuumrssssuceONN8ZvfvObeOedd+Kdd96Jo446Kp5//vmIiDjssMPirLPOirq6uhgwYEB87Wtfi69//evRv3//eOKJJ4r+Tov9/0YEUB05jrGuaZitoP7yl7/w61//ms0335wRI0Zw/PHHM3r0aLp160b37t0ZNGgQAEOGDGHIkCEA3H777cyaNYszzzxzkbzq6uoAaNu2bdFl1dXVIYnp06fTr18/ZsyYwb777gvAlClTGDRoELW1tey///4MGzas8Xv3338/999/P2+99Ra33poe+jdnzhx23HFHfvvb37Leeutx1llnceGFF7LWWmvx85//vLGjdvjw4YwZM4ZDDjmEddddN1d+V1xxBX379i3axFSopqaGTz75hHXXXZd+/frx61//mjZt2lBfX8/AgQP59re/DUDfvn158sknGTt2LNdffz29evXiyiuvZNVVV+W0006jY8eOHHXUUbRr146rr76a+++/n/nz59O2bVtGjx7NnnvuSa9evejYMT3ccdy4cQD87ne/IyKor6/npJNO4ogjjmgs28CBA9lll10YNGgQDz/8MLvssgsnn3wyr732Gvvuuy8dO3akc+fO3HvvvbzyyitstNFGtGnThs8++4w770wPNHzooYf46KOPmv0dlpSDhtkKatCgQeyzzz6N7d7bbrstd955J6eeempjmksvvZRx48Y13sg1ffp06uvrGTt2LJA6tHfddVfq6ur41a9+1dgcUqimpobf/va3nHjiiVx88cXstttujBkzhnbt2tGvXz8efrjw6bcwevRozj77bPr06cOPf/zjxumvv/46H3zwQePn/fbbj7333pvp06czePBgrrvuOtq2bcu8efM444wz2GKLLXLnN2TIED788EOuuOIKJk2axEknnURNTQ0zZ87klVdeoX///gwfPhyADh06sP/++3PrrbcycuTIxmm1tbU89dRTPProowC88sorDBgwgI8//pgDDjiAo48+mqOOOooHHniA+fPn07VrVwD+8Ic/MHv2bI488kj2339/br75Zt544w3efPNN2rVrx+jRo+nevTsAs2fPZuTIkY2B4oYbbmDvvfdmtdVWA1LwbtMmdTl36dKFxx9/nM6dO/Ozn/2M/v37s2DBAjp16sS3vvUtrr766sbt+fnnn/Pmm28C8J//FBtc/Mtz0DBbQRXWCk4++WTmzp27yLRzzjmHc845B0gdzocddhjV1dXMmzev8QDW4Pzzz292mQ01klKXbdbX1xMRTJo0iREjRnDvvfcydOhQOnXq1JimQ4cOi33/0EMPZcSIEZx00kl89tlnnHbaaeyzzz7stttuAFRXV+fKb9111238Db797W/zwgsvMHbsWO677z6uu+66xcq75557Mnz4cB599FH23XdfLrjgAh588EF+8YtfNKbZZptteOKJJxg7dixjx45lk002oW3btrz66qt8/vnndO3alTFjxrDKKquw4YYbsvPOO7PLLrswePBgjj32WH7xi1/Qp0+fxtrP/PnzOeqoo/jlL3/J66+/TqdOnTjzzDM58MADuffee1lrrbUWKWNNTQ2rr7469fX1rL322lx55ZXU1NTQuXNnNthgA+bNm9eY9v3332/sWJ8xYwYDBw4sszWXjoOG2VfEJptsQn19Pe+//35jU0iDL774gpNPPpmbb76Zuro6Bg4cyDXXXEO/fks2lNuIESMYPXo0nTt35oADDgBS81RDU1VdXR0HHnggQ4cO5aGHHmq8gueyyy5rzGPOnDn079+/8fOrr77KKqusQo8ePTjqqKM48MADeeONNzj66KNZddVVAaiqqsqdX14Nv0NDMFmSCwJ+97vf0bNnTz7//HO6dOnCjBkzuPzyyzn++OM56aST2GmnnRo7y9988006dOjAQQcdxKBBgzjmmGMYMGAA5557Lh9++CFt2rShe/fu7LHHHmy33XaMGjWKHj16MGbMGF599VUGDx7MxRdfzCmnnMLxxx/PscceyyGHHLJI4Gyw1lprNW6XF154YYl/kzwcNMxWYLfeeiszZszgkUceYeDAgUyZMoUhQ4bwk5/8pDHNrFmzGDJkCCeeeCJdu3Zl3LhxDBw4kH333ZcJEyaw2Wab5V7eKaecwimnnLLItO23354HH3yw5HcK548bN67xc319Paeeeio33XQTAH//+9/p0KEDL7/8MqutthozZsxgnXXWyZ1fU7W1tYvVxmpraxtrJW3btm28XPnpp59m5513brz67PXXX2fixIkcffTRTJo0aZHmKaCxj2X27NlI4phjjmlcn7Zt2/L88+kRQk1rGgBTp07lRz/6EYceeiiQgk+nTp04/vjjATjiiCPYdNNNeeihh3jvvfd49dVXWX/99Xn33Xe59tpr2WabbYgIZs6c2dgs1tAvUldXR/fu3dl55zQo+Mcffwyk4Fiqr2ppOGiYLQutMPDnqFGjePnll5k8eTJXXnklF110UWNTxcUXX8w555zDRRddxPz58/nggw8YP348s2bNok+fPhx66KH07duXyy67jNtuu+1LlePTTz8tOa/wHoEXXniB448/niuuuAKADz/8kF133ZVvfetbHH300XTp0oXLLruMTTfdlPvvv59DDjmEa665hr59++bKryFNTU0NZ511VuM9GAA777wzCxYs4IQTTmDLLbdsnH777bczY8YMfvaznzF79mxGjRrF6NGjueqqq6irq2PbbbdlzJgxPPfcc4wfPx6AO+64g+HDhy9WUys2PEdDkx5Anz59GgNIw7yamprGzw0BfL/99mO//fZrnN67d2969+7NxIkT2W+//fje977XeOn0/PnzmTVrFoMGDaJHjx6LNK29+OKL1NbWMnjw4MXKtbRadZTbSvAot9YS3njjDTbffPPWLsYyP4u0fD766CNqa2vp0aPZp6Mul4r9/64Qo9ya2ZfjgNE6Vl999dYuQqvxMCJmS+mrVku3lcOX/b910DBbCp06dWL27NkOHLZCiex5GsWuvMrLzVNmS2H99ddn2rRpzJw5s7WLYrZEGp7ct7QqFjQk9QTui4jvlpjfF/g10BkYFRFXSroIaLjgeh3gDuB/gL8Bb2bTD40I76nWqtq3b7/UTz4zW5FVJGhkz/S+A+haJtm1wGBgGjBB0qiIuLBJHveRAsb2wCURcUMlympmZvlVqk+jDjgcmFsmzRoR8e9sdMXZwKoNMyRtB0yLiOlAP+AESS9JurRC5TU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6X2S/d2DdBXLScCmQF9JGxQM77KAJndmN6mZrEK6I34HYO3s+xsCn0VEnaQ2kryf2nLDHeFmS0jSUaRxsjYjjUF1JWmojdOB/yWNb/U30j0VC4BOpNFzAcaRgkd70rX4bYFh2etl0p3Z3UmXHH8MfA04ICJeaIFVM2tWizzu1eyrJCL+IKkW+HFEHCipI2kcre+Txv55P9LYWP0BJJ1GGvahDXBTRPyxIS9J65DGfLqSFITWIQ1Idy7pjuSTHDBseeKahtlSkPQg6SD/IvAAcCJpfKK3STWJ70fEnGyAw1GkO4shDYi4f0R8nOWzPmnoh6OBP5NqJpcCL5DuQt4sIq5pqfUya45rGmZLSNKepGEg/kUaeuSZiPhfSbcDv4iIqUo6kkY1PR/4JvAFaXTc+yUdGhGzSP0Xw0l9GVsD25CGNBmVLe6Rllszs+Y5aJgtuXVI4//cQhrOfIKkecA3gK9JqiHVGg4jjSN0CWkE03pgDmmYlBclHRQREySNJA1l/ghp+PYFkl4iDaZ3cYuumVkzHDTMllBE/A+ApDbZ2Fj9ss+3s7Cm0YfUt3FvNu804IuIuCX7/Efgn1mWN5IeHHQe6UFQGwHfAuaTRqkt9UAssxbnoGG29DoVmdYWICKmAlMLpjc+dzwipkDjmEE3kPpC+pGasW4DzgQ+AO6TdGREvLXsi2+25NwRbtbKJLWLiNrsvYCGGgySFN5JbTnioGFmZrn5TlMzM8vNQcPMzHJz0DAzs9wcNMzMLDcHDTMzy+3/A4bh6OWBvkDvAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#绘制a16过去一年有没有住院的样本均值直方图\n",
    "a16=np.arange(len(mean_a16.values()))\n",
    "width=0.5\n",
    "fig, ax = plt.subplots()\n",
    "rects1 = ax.bar(a16 - width/2, mean_a16.values(), width, \n",
    "                color='red', label='过去一年有没有住院的样本均值')\n",
    "ax.set_ylabel('样本均值')\n",
    "ax.set_xlabel(\"样本数\")\n",
    "ax.set_title('过去一年有没有住院的样本均值')\n",
    "ax.set_xticks(a16-0.25)\n",
    "ax.set_xticklabels(mean_a16.keys())\n",
    "ax.legend()\n",
    "ax.set_ylim(1.8,2)#因为数据的差别很小所以对Y轴进行处理\n",
    "def autolabel(rects, xpos='center'):\n",
    "    for rect in rects:\n",
    "        ax.text(rect.get_x() + rect.get_width()*offset[xpos], 2*a16,\n",
    "                '{}'.format(nianling), ha=ha[xpos], va='bottom')\n",
    "plt.show()\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAETCAYAAADUAmpRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3XmYFNXZ9/HvPSuriDIiQlg0YgwRCAEFN0DBBUVJJMqLgMYoURES0VcwQtQEokb04dUEI6hoVFAxLgFFQMOgIAZBlqDI4wZmRMIioCLMDDP3+8epGdumu2eQ6QGZ3+e6+pqe7rtOnerqU3fVOdVV5u6IiEjNlrGvKyAiIvuekoGIiCgZiIiIkoGIiKBkICIiKBmI7HfMzBK8lrUH09dPVIZIKkoGss+Y2Vozaxzz/5lmNilB3DAzuybm/5PN7KkU5d5vZgfHvdbRzKZUok5tzeyxSsStMrPWMf+fa2aHJYir9EY8RmczmxP32jwz65CkLk+a2UUxL/0RGJGscAvqxfyfYWZ1v0U95QDybb6oIt+amf0Q+ClQAtQFhphZITAX+BmwNIrLADLcfRdwJvBITDFFQHGS8hsAJwADzOxsYArQCTgFaGpm+cBUd78/ij8Y+HNMEblA32jP2gk7TF+5++VxsyqKHmUmRNP9CrgtqjfAS2b2F3d/Nkp0pwOfxUx3DHC+u/8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WLOEPf/gDAHPmzKFOnTq8++67ABx55JHk5OSQnZ1NTk64Fcf27dtZunQpU6ZMKS/jiiuuoEWLFnzwwQfk5uZSWFjItGnTePPNNyksLOTpp59m165dDBkyhPr161fpOlMyEJEqV7duXR566CGaNm0KwGOPPUarVq3o1KkTo0ePZty4cVx77bUMGjSI0047jb59+7Jt2zZee+01ACZPnkx2djbjx4+ncePGTJkyhVGjRvHvf/+bs846i6KiIgoKCjjllFOYPn068+fP5+STTyYnJ4fWrVszduxY6tatS0FBAePHj2f9+vVcffXVZGdn06RJEy655BIGDx6Mu1NcXExWVhZZWVmce+65NGnSpPwIZODAgZxzzjm8/PLLSZe1pKSERo0a0a5dOzp06EDv3r1ZunQpBx10ELfffjuLFi3imWeeYc2aNdx666288847dO3alf79+zN8+HD69u0LwOjRo1m/fj0tWrTgt7/9Lcceeyw9evTgtttuo6CggIyMDLZt28bo0aOrPBGAkoGIpEGtWrXIzc1l+vTpAHTp0oUxY8YwZ84czj77bObMmcPbb7/Niy++yGmnncbzzz/PrFmz+Oqrr8jKymLYsGHlG8k777yTrl27snbtWh5++GHq16/PJ598wkcffURGRgYtW7bk5JNPBsJRxMKFCzn77LPJyMhg5cqVdOvWjddff50ZM2bQvn172rZty8MPP8ySJUvYsmUL3bt3x91ZunQp3bp1w9255ZZb6N69OwC5ubkUFxczceJEXnrpJQA+/fRTBg4Mt7rOzMykQ4cOvPLKK+Tn5zNhwgSaNGnCXXfdxUEHHcSQIUPIzc2lZ8+enHrqqfTq1YsXX3yRU089lSuvvJKVK1dy7rnnkpubS+3atZk2bRrLly+nVatWZGRksH37dh59NNx07oUXXmDLli1pWWdKBiJS5TZs2ECTJk248MILKSkpoXPnzrz33nssWLCA4cOHc/3113PiiSdy4403AqFL6Pbbb+fiiy8mIyODe+65h169elGnTh2uv/56tm/fXt59MnLkSAYPHkxxcTF9+/alcePG5fPdsWMHXbp04cEHHyQ7O5tNmzbx3HPPsW7dOq677jratm0LQKtWrfjd735Hu3btmD9/PsuWLeOEE05g5syZ1K5du7w8d+f0008nPz+fbdu20bhxY2bOnMkDDzxA7FWUly9fTrdu3di6dSt9+vRh4MCBDBgwgH/84x8UFhZSt25dMjMzycgIw7R16tRhzpw51K5dmxtuuIGuXbtSXFxMrVq1aNOmDePHjyc/P798md5///3yzzVdNIAsIlWuXr16dOvWjezsbGrXrs2qVat48sknyc7OZsWKFZx33nlcd911tGjRgl27djF48GDOOOMMmjZtSv369RkxYgS9evVi7dq15adMPv/880yYMIGmTZuyePFiPv30U1asWMGiRYvK5/vJJ59QVFTENddcQ35+Pnl5eZx11llMmTKF73//+0BIPEOHDmXHjh3l082ZM4euXbsye/bsbyzHM888w/HHH0+tWrVYu3Ythx9+eMLlbd++Pfn5+YwfPx6Ao446iszMTFasWMGOHTuoW7fuN+KLiopo2LAhOTk5HHbYYdx1110UFRVRu3ZtfvjDH9KoUaPy2E8//ZQHHniABx54gHnz5u3FWklNyUBEqtwxxxzDpZdeyiWXXMLtt9/OmWeeydy5c3nnnXdYunQpjRo1Kt/Iz507t3xje+utt3LnnXcydepUhg8fzscff1xeZteuXZkwYQLHHXcckyZNYtWqVUyfPp2pU6eybt06IAzi9uvXj/z8fC6++GKys7N5++23uemmm2jfvn35/Jo0aUK/fv2AsGF+6qmnmDRpEvfcc0/5mU2lpaXcdttt3HDDDbg7r7zyCh07diyvz5dffkmq2wb/5S9/oU2bNuzYsYM6depQUFDAlClTWLFiBf369WPlypV07dqVZs2accstt5QfGcRr1KgRffr0oU+fPnTo0GEv10xy6iYSqQn6V/+9zmvVqsUjjzzC6NGjyc7OZvjw4Vx55ZW7xfXs2ZNLL72UwsJCnnnmGXbs2MGgQYPKzyqCsGHOycmhSZMmzJw5k6lTp/LQQw9x9dVX07JlS4qKipg/fz7uzvLly1m9ejXjxo3jN7/5DX/+8585//zzeeyxx/jlL3/J6aefzumnn84TTzxBaWkpI0eOpH///rRo0YIePXpwxRVXcN999/HCCy/QqVMnmjVrxogRI8r79c2MkpISpk2bxoYNG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sBkwm8PRETkAFGpaxO5++Mxz+ekrzoiIrIv6N7DIiKiZCAiIkoGIiKCkoGIiKBkICIiKBmIiAhKBiIigpKBiIigZCAiIigZiIgISgYiIoKSgYiIoGQgIiIoGYiICEoGIiKCkoGIiKBkICIipDEZmNkhZtbTzBqlax4iIlI10pIMzKwhMAM4HphrZnmJYszsRTNbbGb3p6MeIiJSOek6MmgLDHf3scAsoEOCmIHA4+7eEahvZh3TVBcREalAWpKBu89z9zfM7FTC0cHCBGGbgR+Z2cHA94D/pKMuIiJSsXSOGRhwEbAFKE4QMh9oAQwDVgGfJShjcNSNtHjjxo3pqqqISI2XtmTgwRBgBXBegpCbgSvd/ffAu8AvEpQx0d07unvHvLzdhh1ERKSKpGsAeYSZDYr+PRjYmiCsIXCcmWUCJwCejrqIiEjF0nVkMBEYaGavAplAgZmNiYu5LYrbBhwCTE1TXUREpAJZ6SjU3bcAPeNeHhUXswhok475i4jIntEvkEVERMlARESUDEREBCUDERFByUBERFAyEBERlAxERAQlAxERQclARERQMhAREZQMREQEJQMREUHJQEREUDIQERGUDEREBCUDERFByUBERFAyEBERlAxERAQlAxERQclARERQMhAREZQMREQEJQMREUHJQEREUDIQERGUDEREBCUDERFByUBERFAyEBERlAxERAQlAxERQclARERQMhAREZQMRESENCYDMzvEzHqaWaN0zUNERKpGWpKBmTUEZgDHA3PNLC9F7AQz652OeoiISOVkpanctsBwd38jSgwdgFnxQWZ2CnC4u09PUz1ERKQS0nJk4O7zokRwKuHoYGF8jJllA5OANWZ2fjrqISIilZPOMQMDLgK2AMUJQgYB7wB/Ao43s6EJyhhsZovNbPHGjRvTVVURkRovbcnAgyHACuC8BCE/Bia6+3rgMaB7gjImuntHd++Yl5d02EFERPZSugaQR5jZoOjfg4GtCcLeB46MnncE1qajLiIiUrF0HRlMBAaa2atAJlBgZmPiYh4EukcxVwPj0lQXERGpQFrOJnL3LUDPuJdHxcV8Afw8HfMXEZE9o18gi4iIkoGIiCgZiIgISgYiIoKSgYiIoGQ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LCr16Pcfd7qmu5RCqiIwORiJmdQbicwFrCJSxedfcnzOxh4BZ3X2NBLuEqlaOBHwI7CVc7fdbMfu7umwjjA2MIYwXtgPaES2M8E81uZvUtmUjFlAxEvnY44fowDxIuO73AzL4CfgB838yKCHv5FxKuMzOWcEXKUmAb4XIbb5rZz9x9gZk9Rbjk9EzCZbaLzewtwkXUfl+tSyZSASUDkYi7/w3AzDKiayd1jv5/mK+PDFoSxg6mRe8NAXa6+4PR/1OB96Ii/0q4Icsowg12WgFtgELCVUeT3WhIpNopGYjsrlaC1zIB3H0NsCbu9fL7Krv7aii/psx9hLGGzoTupMnA9cB/gafNrL+7f1D11RfZcxpAFkkTM8ty913RcwPKjjgwM3M1PtmPKBmIiIh+gSwiIkoGIiKCkoGIiKBkICIiKBmIiAjw/wEcRJF4wYnBRgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#绘制a17现在整体健康状况的均值的直方图\n",
    "a17=np.arange(len(mean_a17.values()))\n",
    "width=0.5\n",
    "fig, ax = plt.subplots()\n",
    "rects1 = ax.bar(a17 - width/2, mean_a17.values(), width, \n",
    "                color='orange', label='整体健康状况的均值')\n",
    "ax.set_ylabel('样本均值')\n",
    "ax.set_xlabel('样本数')\n",
    "ax.set_title('整体健康状况的均值')\n",
    "ax.set_xticks(a17-0.25)\n",
    "ax.set_xticklabels(mean_a17.keys())\n",
    "ax.legend()\n",
    "ax.set_ylim(3.5,4.5)#同上一幅图对Y轴进行处理\n",
    "def autolabel(rects, xpos='center'):\n",
    "    for rect in rects:\n",
    "        ax.text(rect.get_x() + rect.get_width()*offset[xpos], 2*a17,\n",
    "                '{}'.format(nianling), ha=ha[xpos], va='bottom') \n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "样本均值：\n",
      "过去一年有没有住院:    1.917737\n",
      "整体健康状况:       4.053506\n",
      "dtype: float64\n",
      "样本标准误：\n",
      "过去一年有没有住院:    0.010240\n",
      "整体健康状况:       0.026301\n",
      "dtype: float64\n"
     ]
    }
   ],
   "source": [
    "#计算均值和标准误\n",
    "a16=[]\n",
    "for i in mean_a16.values():\n",
    "    a16.append(i)\n",
    "a17=[]\n",
    "for i in mean_a17.values():\n",
    "    a17.append(i)\n",
    "average={'过去一年有没有住院:':a16,\n",
    "         '整体健康状况:':a17,\n",
    "        }\n",
    "frame = pd.DataFrame(average,index=mean_a16.keys())\n",
    "print('样本均值：')\n",
    "print(frame.mean())\n",
    "print('样本标准误：')\n",
    "print(frame.std())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 回归分析"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "+ 请从CEPS.csv数据里挑选若干变量建立回归方程，要求至少三个自变量\n",
    "    + 如，学生的学业成绩受认知水平、家庭收入的影响\n",
    "    + 考虑因变量和自变量间的实质关系，变量间关系应该是有意义\n",
    "    + 选择自变量时，注意变量的类型，如果是分类变量，需要进行编码\n",
    "+ 请报告回归方程的结果，需要包括：\n",
    "    + 模型拟合指标\n",
    "    + 模型的显著性检验结果\n",
    "    + 变量的系数\n",
    "    + 各系数的显著性检验结果\n",
    "    + 对模型结果的解释\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "import statsmodels.api as sm\n",
    "import statsmodels.formula.api as smf\n",
    "import numpy as np\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\97657\\Anaconda3\\lib\\site-packages\\IPython\\core\\interactiveshell.py:2785: DtypeWarning: Columns (20,22,23,25,28,29,39,49,74,124,125,126,127,128,129,130,131,138,160,161,162,165,170,174,175,176,177,179,180,181,182,183,184,188,191,195,196,199,221,222,223,224,251,252,254,289,290,294,295,296) have mixed types. Specify dtype option on import or set low_memory=False.\n",
      "  interactivity=interactivity, compiler=compiler, result=result)\n"
     ]
    }
   ],
   "source": [
    "sentinels = {'b1002': [' '], 'b2301': [' '], 'b2302': [' '] ,'b2308': [' '] ,'c12': [' ']}\n",
    "df = pd.read_csv('CEPS.csv',encoding='gb2312', na_values=sentinels)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>x1</th>\n",
       "      <th>x2</th>\n",
       "      <th>x3</th>\n",
       "      <th>x4</th>\n",
       "      <th>y</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>13013</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>644</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10038</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2815</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5072</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11567</th>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3769</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5957</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11539</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15314</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6092</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10866</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17414</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3024</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17997</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13568</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9139</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17985</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1173</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2017</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18568</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15849</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11506</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15340</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2305</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17195</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>140</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2810</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1208</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12944</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2248</th>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5486</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3999</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11806</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16112</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10219</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14653</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6183</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6102</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18020</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17785</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17237</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17022</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16225</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13505</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1121</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14280</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13922</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10425</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6369</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14540</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17073</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13411</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9841</th>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17463</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10283</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4582</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>203</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16696</th>\n",
       "      <td>1.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>3.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14563</th>\n",
       "      <td>1.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>953 rows × 5 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        x1   x2   x3   x4    y\n",
       "13013  1.0  2.0  3.0  2.0  2.0\n",
       "644    1.0  3.0  3.0  3.0  5.0\n",
       "10038  1.0  2.0  2.0  2.0  3.0\n",
       "2815   1.0  3.0  2.0  3.0  3.0\n",
       "5072   1.0  3.0  3.0  3.0  3.0\n",
       "11567  2.0  2.0  2.0  2.0  4.0\n",
       "3769   1.0  3.0  2.0  2.0  2.0\n",
       "5957   1.0  3.0  2.0  3.0  4.0\n",
       "11539  1.0  2.0  2.0  3.0  4.0\n",
       "15314  1.0  2.0  2.0  2.0  2.0\n",
       "6092   1.0  2.0  3.0  3.0  1.0\n",
       "10866  1.0  3.0  3.0  3.0  4.0\n",
       "17414  1.0  3.0  3.0  3.0  2.0\n",
       "3024   1.0  3.0  3.0  3.0  3.0\n",
       "17997  1.0  2.0  2.0  3.0  2.0\n",
       "13568  1.0  3.0  3.0  2.0  4.0\n",
       "9139   1.0  2.0  3.0  3.0  4.0\n",
       "17985  1.0  3.0  2.0  2.0  3.0\n",
       "1173   1.0  3.0  2.0  2.0  3.0\n",
       "2017   1.0  2.0  3.0  3.0  3.0\n",
       "18568  1.0  3.0  2.0  3.0  5.0\n",
       "15849  1.0  3.0  2.0  3.0  3.0\n",
       "11506  1.0  2.0  2.0  3.0  3.0\n",
       "15340  1.0  3.0  2.0  3.0  2.0\n",
       "2305   1.0  2.0  2.0  2.0  4.0\n",
       "17195  1.0  3.0  3.0  3.0  3.0\n",
       "140    1.0  3.0  2.0  2.0  2.0\n",
       "2810   1.0  2.0  2.0  2.0  3.0\n",
       "1208   1.0  2.0  2.0  2.0  5.0\n",
       "12944  1.0  2.0  2.0  2.0  4.0\n",
       "...    ...  ...  ...  ...  ...\n",
       "2248   2.0  3.0  3.0  3.0  3.0\n",
       "5486   1.0  3.0  2.0  2.0  3.0\n",
       "3999   1.0  3.0  2.0  2.0  2.0\n",
       "11806  1.0  3.0  3.0  1.0  3.0\n",
       "16112  1.0  2.0  2.0  2.0  3.0\n",
       "10219  1.0  3.0  2.0  2.0  3.0\n",
       "14653  1.0  2.0  2.0  2.0  2.0\n",
       "6183   1.0  3.0  3.0  3.0  1.0\n",
       "6102   1.0  3.0  2.0  3.0  2.0\n",
       "18020  1.0  3.0  3.0  3.0  1.0\n",
       "17785  1.0  3.0  3.0  3.0  2.0\n",
       "17237  1.0  3.0  3.0  3.0  1.0\n",
       "17022  1.0  3.0  3.0  2.0  3.0\n",
       "16225  1.0  2.0  2.0  3.0  3.0\n",
       "13505  1.0  3.0  3.0  1.0  4.0\n",
       "1121   1.0  2.0  2.0  2.0  3.0\n",
       "14280  1.0  2.0  2.0  3.0  3.0\n",
       "13922  1.0  3.0  3.0  3.0  3.0\n",
       "10425  1.0  2.0  2.0  1.0  5.0\n",
       "6369   1.0  2.0  2.0  2.0  3.0\n",
       "14540  1.0  2.0  2.0  2.0  1.0\n",
       "17073  1.0  3.0  3.0  2.0  2.0\n",
       "13411  1.0  2.0  2.0  3.0  3.0\n",
       "9841   2.0  2.0  1.0  2.0  3.0\n",
       "17463  1.0  3.0  3.0  2.0  4.0\n",
       "10283  1.0  3.0  3.0  2.0  4.0\n",
       "4582   1.0  2.0  2.0  2.0  1.0\n",
       "203    1.0  2.0  2.0  3.0  2.0\n",
       "16696  1.0  3.0  3.0  2.0  4.0\n",
       "14563  1.0  2.0  2.0  2.0  2.0\n",
       "\n",
       "[953 rows x 5 columns]"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#x1代表父母是否经常吵架\n",
    "#x2代表父母在作业考试上对你的管的严不严\n",
    "#x3代表父母在学校表现上对你的管的严不严\n",
    "#x4代表父母在看电视的时间对你管的严不严\n",
    "#y代表你目前的成绩在班上处于哪个层次。\n",
    "df1=df.sample(n=1000)\n",
    "T2 = pd.DataFrame({\n",
    "    'x1': df1.b1002,\n",
    "    'x2': df1.b2301,\n",
    "    'x3': df1.b2302,\n",
    "    'x4': df1.b2308,\n",
    "    'y':  df1.c12})\n",
    "T2=T2.dropna(axis=0,how='any')\n",
    "T2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "#构建自变量和因变量\n",
    "model_x= ['x1','x2','x3','x4']\n",
    "x = T2.loc[ :,model_x].values\n",
    "y=T2['y'].values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.61897391, 0.57119009, 0.03565297, 0.32738223])"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#用最小二乘法进行拟合\n",
    "model = sm.OLS(y, x)  \n",
    "results = model.fit()\n",
    "results.params"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "                            OLS Regression Results                            \n",
      "==============================================================================\n",
      "Dep. Variable:                      y   R-squared:                       0.871\n",
      "Model:                            OLS   Adj. R-squared:                  0.871\n",
      "Method:                 Least Squares   F-statistic:                     1608.\n",
      "Date:                Sun, 30 Dec 2018   Prob (F-statistic):               0.00\n",
      "Time:                        21:10:34   Log-Likelihood:                -1482.8\n",
      "No. Observations:                 953   AIC:                             2974.\n",
      "Df Residuals:                     949   BIC:                             2993.\n",
      "Df Model:                           4                                         \n",
      "Covariance Type:            nonrobust                                         \n",
      "==============================================================================\n",
      "                 coef    std err          t      P>|t|      [0.025      0.975]\n",
      "------------------------------------------------------------------------------\n",
      "x1             0.6190      0.104      5.956      0.000       0.415       0.823\n",
      "x2             0.5712      0.070      8.181      0.000       0.434       0.708\n",
      "x3             0.0357      0.068      0.527      0.599      -0.097       0.169\n",
      "x4             0.3274      0.057      5.788      0.000       0.216       0.438\n",
      "==============================================================================\n",
      "Omnibus:                       16.211   Durbin-Watson:                   2.008\n",
      "Prob(Omnibus):                  0.000   Jarque-Bera (JB):               13.502\n",
      "Skew:                          -0.218   Prob(JB):                      0.00117\n",
      "Kurtosis:                       2.612   Cond. No.                         12.6\n",
      "==============================================================================\n",
      "\n",
      "Warnings:\n",
      "[1] Standard Errors assume that the covariance matrix of the errors is correctly specified.\n"
     ]
    }
   ],
   "source": [
    "print(results.summary())"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "分析： \n",
    "1.模型拟合指标:\n",
    "自变量:\n",
    "x1代表父母是否经常吵架   1=是    2=否\n",
    "x2代表父母在作业考试上对你的管的严不严    1=不管，2=管，但不严，3=管的很严\n",
    "x3代表父母在学校表现上对你的管的严不严    1=不管，2=管，但不严，3=管的很严\n",
    "x4代表父母在看电视的时间对你管的严不严    1=不管，2=管，但不严，3=管的很严\n",
    "因变量\n",
    "y代表你目前的成绩在班上处于哪个层次。     1=不好，2=中下，3=中等，4=中上，5=很好\n",
    "\n",
    "2.模型的显著性检验结果:该模型的P值为小于0.05,所以在该模型中自变量有显著线性关系作用.\n",
    "\n",
    "3.变量的系数:x1的系数为0.6190,x2的系数为0.5712,x3的系数为0.0357，x4的系数为0.3274.\n",
    "\n",
    "4.各系数的显著性检验结果:在置信区间95%的情况下,x1的p值为0,x2的p值为0,x3的p值=0.599,x4的p值为0所以x1、x2和x4对y的作用是显著的，x3对y的影响是不显著.\n",
    "\n",
    "5.对模型结果的解释:R方为87.1说明模型的拟合效果较好，根据该检验结果可知,x1（代表父母是否经常吵架）、x2（父母在作业考试上对你的管的严不严）和x4(父母在上网时间对你管的严不严)对y(目前的成绩在班上处于哪个层次)起显著作用."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
